(easy-menu-name-match): Match both
authorJason Rumney <jasonr@gnu.org>
Tue, 14 May 2002 21:19:16 +0000 (21:19 +0000)
committerJason Rumney <jasonr@gnu.org>
Tue, 14 May 2002 21:19:16 +0000 (21:19 +0000)
displayed text and internal name as string.

lisp/emacs-lisp/easymenu.el

index 51b2c3b91e472c71997afee88e6d965b66ab112a..fe0a8b841a58b5c2321ae2c6a51e42809a78b14f 100644 (file)
@@ -413,7 +413,11 @@ NAME can be either a string, or a symbol."
       (if (symbolp name) 
          (eq (car-safe item) name)
        (if (stringp name)
-           (member-ignore-case name item)))))
+           ;; Match against the text that is displayed to the user.
+           (or (member-ignore-case name item)
+               ;; Also check the string version of the symbol name,
+               ;; for backwards compatibility.
+               (eq (car-safe item) (intern name)))))))
 
 (defun easy-menu-always-true (x)
   "Return true if form X never evaluates to nil."